SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS OFF
GO
CREATE PROCEDURE [dbo].[paCertificaObtenerModelosCertificados]

	@SoloActivos CHAR(1)

AS
SET NOCOUNT ON
SET DATEFORMAT DMY

SELECT IDModeloCertificado AS ID, LTRIM(RTRIM(Descripcion))+' - Doc.: '+LTRIM(RTRIM(RutayNombreRPT)) AS Descripcion
    FROM Tb_ModeloCertificado 
    WHERE (@SoloActivos = 'S' AND Activo = 'S') OR (@SoloActivos = 'N')
GO
GRANT EXECUTE ON  [dbo].[paCertificaObtenerModelosCertificados] TO [Certificaciones]
GRANT EXECUTE ON  [dbo].[paCertificaObtenerModelosCertificados] TO [CertificacionesAdministracion]
GRANT EXECUTE ON  [dbo].[paCertificaObtenerModelosCertificados] TO [SoloVer]
GO
